<script>
import { mapState } from 'vuex'

export default {
    methods: {
        incrementCount(num) {
            this.$store.dispatch("incrementAsync", num).then(data => {
                console.log(data);
            })
        }
    },
    computed: {
        ...mapState(["count"]),
    }
}
</script>

<template>
    <p>count:{{ count }}</p>
    <button @click="incrementCount(2)">changeCount</button>
</template>

